{{ define "template/verify.html" }}
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script type="application/javascript" src="../../static/js/jquery-1.12.4.min.js"></script>
    <script src="../../static/js/jquery.cookie-1.4.1.min.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
          integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
            integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd"
            crossorigin="anonymous"></script>
    <!-- 引入layui css -->
    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css"/>
    <!-- 引入layui js -->
    <script src="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>
    <link rel="stylesheet" href="../../static/css/verify.css">
    <title>{{.title}}</title>
</head>
<body>
<div class="head col-md-12 col-xs-12 col-sm-12">
    <div class="head_logo">
        <img src="../../static/img/login_logo.png" alt="">
    </div>
    <div class="user_menu">
        <ul>
            {{ if .name }}
            <li><a id="login"><img src="../../static/img/login32.png">欢迎您：</a></li>
            <li>
                <a id="registry" style="margin-left: -15px" onclick="showHideMenu()"><strong>{{ .name }}</strong></a>
            </li>
            {{ else }}
            <li>
                <a id="registry" style="margin-left: -15px" onclick="mobileLogin()"><strong>登录</strong></a>
            </li>
            {{end}}
        </ul>
    </div>
    <div class="userMenuPanel">
        <ul>
            {{ if .success }}
            <li id="myOrder" ><span onclick="myWorkOder()">我的工单</span></li>
            {{ end }}
            <hr>
            <li onclick="cLogout()">退出登录</li>
        </ul>
    </div>
</div>
<div class="msg_body">
    <!-- 判断 materCount 如果大于 0 说明是正品，则开始渲染商品内容，否则显示另一个内容 -->
    {{ if .success}}
    <div class="product">
        <p><strong>恭喜~您的商品来自正规渠道，属正品~感谢您对本司的信赖与支持，商品信息如下：</strong></p>
        <ul id="productInfo">
            {{range .mater}}
            <li id="materId" style="display: none">商品Id:{{.Mid}}</li>
            <li><strong>商品名称：</strong>{{.Mname}}</li>
            <li><strong>品牌名称：</strong>{{.Brand}}</li>
            <li><strong>规格型号：</strong>{{.Model}}</li>
            {{end}}
            <li><strong>出厂日期：</strong>{{.time}}</li>
            {{ if ne .isExpire "该商品尚在保修期内，请放心使用！" }}
            <li><strong>保修状态：</strong><span style="color: #FFBB66; font-size: 16px;font-weight: bold;">{{.isExpire}}</span></li>
                {{ if ne .myPro "" }}
                <li>
                    <span style="font-size: 16px;font-weight: bold;">
                        <strong>{{.myPro}}</strong>
                    </span>
                    <span style="display: block"><a href="http://sh.lianliwork.com:8088" style="color: #0E76E1">售后服务</a> <strong>进入售后平台创建工单</strong></span>
                    <span style="display: block">对结果有疑问请拨打售后联系电话 <a href="tel:18025907087" style="color: #0E76E1">18025907087</a> 咨询</span>
                </li>
                {{ else }}
                <!-- 创建工单按钮板块 -->
                <div class="create_work">
                    <!-- 点击创建工单后检查用户是否登录，没有登录则弹出登录界面 -->
                    若需要对该商品返厂进行售后服务请点击 <strong onclick="createWorkBth()">售后</strong>
                </div>
                {{end}}
            {{ else }}  <!-- 在保修期内 -->
            <li><strong>保修状态：</strong>{{.isExpire}}</li>
            <li>
                {{ if ne .myPro "" }}
                    <strong>{{.myPro}}</strong>
                    <span style="display: block"><a href="http://sh.lianliwork.com:8088" style="color: #0E76E1">售后服务</a> <strong>进入售后平台创建工单</strong></span>
                    <span style="display: block">对结果有疑问请拨打售后联系电话 <a href="tel:18025907087" style="color: #0E76E1">18025907087</a> 咨询</span>
                {{ end }}
            </li>
            {{ if eq .myPro "" }}
            <!-- 创建工单按钮板块 -->
            <div class="create_work">
                <!-- 点击创建工单后检查用户是否登录，没有登录则弹出登录界面 -->
                若需要对该商品返厂进行售后服务请点击 <strong onclick="createWorkBth()">售后</strong>
            </div>
            {{end}}
            {{end}}
        </ul>
    </div>
    <!-- 工单信息板块,默认隐藏 -->
    <div class="work_info">
        <!-- 选择工单类型时需要判断产品是否已过保，如果以过保则只能选择维修工单，未过保则可以选择售后服务和维修工单 -->
        <div class="workType">
            <h5>请先选择工单类型：</h5>
            <hr>
            <ul>
                {{ if ne .isExpire "您的商品尚在保修期内，请放心使用！" }}
                <li>
                    <button type="button" class="btn btn-default" onclick="chooseWType(this)">返修工单</button>
                </li>
                {{ else }}
                <li>
                    <button type="button" class="btn btn-default" onclick="chooseWType(this)">维修工单</button>
                </li>
                {{end}}
            </ul>
            <span><i class="glyphicon glyphicon-warning-sign">：</i>保修期内的请选择返修工单直接返修即可，保修期外的请先与对接业务联系后选择维修工单否则造成的商品丢失我司概不负责!</span>
        </div>
        <div class="ret_addr">
            <p>
                <label for="saleAdr">选择销售人员查看返修地址：</label>
                <select name="saleAdr" id="saleAdr">
                    <option value=""></option>
                    {{range .sales}}
                    <option value="{{.Uid}}-{{.UserName}}">{{.UserName}}</option>
                    {{end}}
                </select>
            </p>
        </div>
        <div class="address">
            <div class="addr">
                <p class="addrShow" style="display: block;">
                    地址：广东省.东莞市.清溪镇.铁松村.香窝路18号.东莞市链力电子科技有限公司<br>联系人：<strong>业务1</strong> <br>电话：18025907087
                </p>
            </div>
        </div>
        <div class="cliAddr">
            <ul>
                <li><h5>回寄地址：</h5></li>
                {{ if .addr }}
                {{ else }}
                <li><h5 id="addAddr" onclick="add_address()">+ 添加地址</h5></li>
                {{ end }}
            </ul>
            <hr>
            {{ if .addr }}
            {{range $i, $v := .addr}}
            <p id="addr">{{$v}}</p>
            {{end}}
            {{else}}
            <p style="color: #eee;">地址空空如也，赶快添加吧</p>
            {{end}}
        </div>
        <div class="expressPanel">
            <h5>返厂物流</h5>
            <hr>
            <ul class="express_info">
                <li>
                    <label for="expressName">物流公司：</label>
                    <select name="expressName" id="expressName">
                        <option value="" disabled="" selected="" hidden="">请选择物流公司</option>
                        <option value=""></option>
                        {{range .logDats}}
                        <option value="{{.Lid}}">{{.Lname}}</option>
                        {{end}}
                    </select>
                </li>
                <li>
                    <label for="expressNumber">物流单号：</label>
                    <input type="text" name="expressNumber" id="expressNumber" placeholder="请输入快递单号">
                </li>
            </ul>
        </div>
        <div class="ProblemDesc">
            <h5>问题描述</h5>
            <hr>
            <textarea name="desc" id="proDesc" rows="2" placeholder="请简述故障原因"></textarea>
        </div>
        <div class="submitPanel">
            <button type="button" class="btn btn-info submitBtn" onclick="submit_btn()">提交</button>
        </div>
    </div>
    <!-- 我的工单面板内容 -->
    <div class="myOrder">
        <h3>工单信息</h3>
        <hr>
        <div class="chooseType">
            <ul>
                <li onclick="chooseMenu(this)">返修工单</li>
                <li onclick="chooseMenu(this)">维修工单</li>
                <li>
                    <div class="searchGroup">
                        <input type="text" name="search" id="search" placeholder="输入返厂快递单号搜索">
                        <span id="searchBtn" onclick="searchBtn(this)">搜索</span>
                    </div>
                </li>
            </ul>
        </div>
        <div class="orderDat">
            <div class="noneTishi"></div>
            <div class="search_exhibit">
                <div id="search_scrollTable">
                    <table class="thead">
                        <col width="23%">
                        <col width="23%">
                        <col width="10%">
                        <col width="13%">
                        <col width="23%">
                        <col width="8%">
                        <tbody>
                        <tr>
                            <th style="display: none">id</th>
                            <th>物料</th>
                            <th>创建时间</th>
                            <th>状态</th>
                            <th>维修费</th>
                            <th>快递号</th>
                            <th>操作</th>
                        </tr>
                        </tbody>
                    </table>
                    <div>
                        <table class="tbody">
                            <col width="23%">
                            <col width="23%">
                            <col width="10%">
                            <col width="13%">
                            <col width="23%">
                            <col width="8%">
                            <tbody class="table_data"></tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="returnPal">
            <span onclick="retBtn()">返回</span>
        </div>
    </div>
    <!-- 支付选择面板 -->
    <div class="payPanel">
        <h3>订单详情</h3>
        <hr>
        <div class="payInfo">
            <div id="orderInfo">
                <ul>
                    <li><strong>订单编号：</strong><span id="orderDate"></span></li>
                    <li><strong>创建时间：</strong><span id="createDate"></span></li>
                    <li><strong>商品名称：</strong><span><b id="goodsName"></b> 产品维修费用</span></li>
                    <li><strong>应付金额：</strong><span id="gas"></span></li>
                </ul>
            </div>
        </div>
        <div class="payChoose">
<!--            <h3>支付方式</h3>-->
<!--            <hr>-->
            <a id="aliPay" onclick="payMethod(this)">支付宝支付</a>
            <a id="wxPay" onclick="payMethod(this)">微信支付</a>
            <div class="returnList">
                <p onclick="payReturnBtn()">返回</p>
            </div>
        </div>
        <div class="errorTishi">
            <span id="errorsTishi" style="color: #FF5722"></span>
        </div>
    </div>
    {{ else }}
    <div class="productFake">
        <p>
            <strong style="font-size: 23px">注意：</strong>
            <strong style="color: #888;">如您已登录仍跳转到该界面看到此内容</strong>，那么您的商品可能来自非正规渠道，属伪造品，为了让您的产品能发挥出更好的性能及享受我司售后服务保障，
            建议您通过下面的链接进入本司官方商城购买正品,并通过下面的举报电话联系我司，我司将严厉打击伪造品售卖商追究法律责任！
            并对举报人给予相应的奖励！<strong style="color: #888;">未登录则请点击右上角登录按钮进行登录</strong>
        </p>
        <p>官方商城：<a href="http://cn.lianliwork.com/">官网</a></p>
        <p id="reportPhone">举报电话：<a href="tel:400-1265-4562">400-1265-4562</a> | <a href="tel: 18025907087">18025907087</a></p>
    </div>
    {{ end }}
</div>
<!-- 添加地址弹框提示 -->
<div class="address_send_con">
    <div class="address_send">
        <div class="address_send_info">
            <div id="address_warning">添加地址</div>
            <div class="del_address_info">
                <ul class="list-group">
                    <li class="list-group-item">
                        <label for="username"><i style="color: orangered">*</i> 姓名：</label>
                        <input type="text" name="username" id="username" placeholder="请真实填写收货人姓名">
                    </li>
                    <li class="list-group-item">
                        <label for="province"><i style="color: orangered">*</i> 省份：</label>
                        <select name="province" id="province"></select>
                    </li>
                    <li class="list-group-item">
                        <label for="city"><i style="color: orangered">*</i> 城市：</label>
                        <select name="city" id="city"></select>
                    </li>
                    <li class="list-group-item">
                        <label for="userAddr"><i style="color: orangered">*</i> 地址：</label>
                        <input type="text" name="userAddr" id="userAddr" placeholder="详细地址">
                    </li>
                    <li class="list-group-item">
                        <label for="phone"><i style="color: orangered">*</i> 手机：</label>
                        <input type="text" name="phone" id="phone" placeholder="请输入联系方式">
                        <span id="address_tishi">提示：如果寄回联系方式与登录联系方式不同，可删除后重新填写提交</span>
                    </li>
                </ul>
            </div>
            <button class="btn btn-info addressConfirmBtn" onclick="add_addrBtn(this)">确认</button>
            <button class="btn btn-default addressCancelBtn" onclick="add_addrBtn(this)">取消</button>
        </div>
    </div>
    <!-- 该 div 用来设置弹框的整个背景，即弹框透明的部分 -->
    <div class="address_send_mask"></div>
</div>
<!-- 登录弹框页面 -->
<div class="login_send_con">
    <div class="login_send">
        <div class="login_send_info">
            <div id="login_warning">登录认证</div>
            <div class="del_login_info">
                <ul class="list-group">
                    <li class="list-group-item">
<!--                        <label for="phoneName"><i style="color: orangered">*</i> 输入手机号登录：</label>-->
                        <input type="text" name="phoneName" id="phoneName" placeholder="请输入手机号">
                    </li>
                </ul>
            </div>
            <span id="login_tishi"></span>
            <button class="btn btn-info loginConfirmBtn" onclick="loginBtn(this)">登录</button>
            <div class="phoneRegis">
                <span>无法进入？前往 <strong><a onclick="phoneRegis()" style="color: #0E76E1">添加个人信息</a></strong></span>
            </div>
        </div>
    </div>
    <!-- 该 div 用来设置弹框的整个背景，即弹框透明的部分 -->
    <div class="login_send_mask"></div>
</div>
<!-- 注册弹框页面 -->
<div class="regis_send_con">
    <div class="regis_send">
        <div class="regis_send_info">
            <div id="regis_warning"><h1 class="title">添加资料</h1></div>
            <div class="del_regis_info">
                <ul class="list-group">
                    <li class="list-group-item">
                        <li><input class="input_box" name="mobileUsername" type="text" placeholder="请输入真实姓名"></li>
                        <li><input class="input_box" name="mobilePhone" type="text" placeholder="请输入手机号码"></li>
<!--                        <li><select name="sale" id="mobileSale"></select></li>-->
                    </li>
                </ul>
            </div>
            <span id="regis_tishi"></span>
            <button class="btn btn-info regisConfirmBtn" onclick="regisBtn(this)">提交</button>
            <div class="phoneRegis">
                <span>已有资料？前往 <strong><a onclick="phoneLogin()" style="color: #0E76E1">认证</a></strong></span>
            </div>
        </div>
    </div>
    <!-- 该 div 用来设置弹框的整个背景，即弹框透明的部分 -->
    <div class="regis_send_mask"></div>
</div>
<!-- 底部栏 -->
<div class="bottom col-md-12 col-xs-12 col-sm-1" style="position: fixed">
    <div class="text_url">
            <span>友情链接:
                <a href="http://cn.lianliwork.com/">链力官网</a> |
                <a href="http://sh.lianliwork.com:8088">链力售后</a> |
                <a href="http://cn.lianliwork.com/about.html">关于我们</a> |
                <a href="https://v3.bootcss.com/">bootstrap</a> |
                <a href="https://www.baidu.com/">百度</a>
            </span>
    </div>
    <span id="filing">备案号：<i>粤ICP备2022032841号</i></span>
</div>
</body>
<script type="application/javascript" src="../../static/js/verify.js"></script>
</html>
{{end}}